<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>双享计划-第二期</title>
		<link rel="stylesheet" type="text/css" href="../../www/Public/Bootstrap/css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../www/Public/Special/Css/sx/sx.css"/>
	</head>
	<body>
		<img width="100%" class="leftt" src="../../www/Public/Special/Img/sx/two/banner.png" alt="" />
		<img width="100%" class="leftt" src="../../www/Public/Special/Img/sx/two/01.png" alt="" />
		<div class="sx_1">
			<div class="sx_1_L">
				<div class="sx_1_t">
					<p>小米MIX 128G/256G</p>
					<p>颜色任选</p>
				</div>
				<img onclick="MIX()" width="100%" src="../../www/Public/Special/Img/sx/two/02.png" alt="" />
			</div>
			<div class="sx_1_R">
				<div class="sx_1_t">
					<p>Iphone7/7plus 128G </p>
					<p>颜色任选</p>
				</div>
				<img onclick="Iphone()" width="100%" src="../../www/Public/Special/Img/sx/two/03.png" alt="" />
			</div>
		</div>
		<img width="100%" class="leftt" src="../../www/Public/Special/Img/sx/two/04.png" alt="" />
		<div class="sx_2">
			<div class="sx_2_1">
				<p class="clearfix">
					<span class="sx_2_1_s1 clearfix">
						<img height="26px" class="leftt" src="../../www/Public/Special/Img/sx/two/05.png" alt="" />
					</span>
					<span class="sx_2_1_s2">本活动针对所有注册贷你盈用户。同一用户可多次投资同一期双享计划。</span>
				</p>
				<p class="clearfix">
					<span class="sx_2_1_s1 clearfix">
						<img height="26px" class="leftt" src="../../www/Public/Special/Img/sx/two/05.png" alt="" />
					</span>
					<span class="sx_2_1_s2">活动期间内，选择不同类型礼品，投资额度不同。</span>
				</p>
				<p class="clearfix">
					<span class="sx_2_1_s1 clearfix">
						<img height="26px" class="leftt" src="../../www/Public/Special/Img/sx/two/05.png" alt="" />
					</span>
					<span class="sx_2_1_s2">双享计划需在最新版贷你盈APP上投资。封闭期一年，不可提前赎回。到期后返本。</span>
				</p>
				<p class="clearfix">
					<span class="sx_2_1_s1 clearfix">
						<img height="26px" class="leftt" src="../../www/Public/Special/Img/sx/two/05.png" alt="" />
					</span>
					<span class="sx_2_1_s2">优惠券（红包、加息券等）无法在该计划中进行使用。</span>
				</p>
				<p class="clearfix">
					<span class="sx_2_1_s1 clearfix">
						<img height="26px" class="leftt" src="../../www/Public/Special/Img/sx/two/05.png" alt="" />
					</span>
					<span class="sx_2_1_s2">投资成功后进行分享，可获得1—10元随机金额红包。</span>
				</p>
				<div class="sx_2_1_2">
					<div class="sx_2_1_div">IPhone 7 128G一部需投资  元</div>
					<div class="sx_2_1_div">IPhone 7 Plus 128G一部需投资  元</div>
					<div class="sx_2_1_div">小米MIX 标准版 128G一部  需投资  元</div>
					<div class="sx_2_1_div">小米MIX 标准版 256G一部  需投资  元</div>
					<div class="sx_2_1_div">小米MIX 尊享版 128G一部  需投资  元</div>
					<div class="sx_2_1_div" style="margin-bottom: 0;">小米MIX 尊享版 256G一部  需投资  元</div>
				</div>
			</div>
		</div>
		<div class="sx_3">
			<div class="sx_3_1">
				<img width="100%" class="leftt" src="../../www/Public/Special/Img/sx/two/06.png" alt="" />
				<p>1. 投资成功后，根据不同投资金额可获得相应专属礼品。礼品数量有限，先到先得。若出现礼品库存不足情况，客服人员会及时与您取得联系，预计到货时间会延长1—3个月。</p>
				<p>2. 工作人员会在投资成功后3个工作日内与您取得联系，请您保持手机畅通，及时确认产品详情以及收货地址等相关信息。</p>
				<p>3. 配送由第三方进行配送，具体配送时间以第三方告知为准。送货前配送员将与您联系，请保持手机畅通。</p>
			</div>
			<div class="sx_3_1">
				<img width="100%" class="leftt" src="../../www/Public/Special/Img/sx/two/07.png" alt="" />
				<p>1. “双享计划”礼品不提供发票。凡“双享计划”相应礼品，无质量问题不得进行退换。如发生质量问题可咨询贷你盈客服，客服人员将协助您维权。若非质量问题，不可进行退换。贷你盈可向您提供发票复印件或扫描件。 </p>
				<p>2. 该活动与苹果公司和小米公司无关。活动最终解释权归贷你盈所有，如有疑问请拨打</p>
				<p>400-800-2219  联系客服。</p>
			</div>
		</div>
		<!--小米-->
		<div class="tuank_1">
			<div class="tuank1_1" id="xiaomi_group">
				<img height="20px" class="gb1" src="../../www/Public/Special/Img/sx/two/gb.png" alt="" />
				<h1>小米MIX规格选择</h1>
				<p class="sx_tk_p1">机型：</p>
				<p class="sx_tk_p2 J">
					<span class="sx_tk_xx mar sx_mor" value="2">标准版</span>
					<span class="sx_tk_xx" value="1">尊享版</span>
				</p>
				<p class="sx_tk_p1">颜色：</p>
				<p class="sx_tk_p2 S">
					<span class="sx_tk_xx mar sx_mor" value="黑色">黑色</span>
					<span class="sx_tk_xx" style="color: #cbcbcb;" value="黑金">黑金</span>
				</p>
				<p class="sx_tk_p1">内存：</p>
				<p class="sx_tk_p2 N">
					<span class="sx_tk_xx mar sx_mor" value="128">128G</span>
					<span class="sx_tk_xx" value="256">256G</span>
				</p>
				
				<span style="display:none;" class="tz"></span>
				
				<div class="sx_nr_s">您选择了 <span class="j">标准版</span><span class="s"> 黑色</span> <span class="n">128G</span>需投资 <span id="tzmoney" class="q">{$deal_xm}</span></div>
				<div class="sx_qzf">去支付</div>
			</div>
		</div>
		<!--iPhone-->
		<div class="tuank_2">
			<div class="tuank2_1" id="apple_group">
				<img height="20px" class="gb1" src="../../www/Public/Special/Img/sx/two/gb.png" alt="" />
				<h1>iPhone 规格选择</h1>
				<p class="sx_tk_p1">机型：</p>
				<p class="sx_tk_p2 J">
					<span class="sx_tk_xx apple mar sx_mor" value="3">iPhone7</span>
					<span class="sx_tk_xx apple" value="4">7 Plus </span>
				</p>
				<p class="sx_tk_p1">颜色：</p>
				<p class="sx_tk_p2 S" style="height: 150px;">
					<span class="sx_tk_xx mar sx_mor" value="亮黑">亮黑</span>
					<span class="sx_tk_xx" value="黑色">黑色</span>
					<span class="sx_tk_xx mar" value="银色">银色</span>
					<span class="sx_tk_xx" value="金色">金色</span>
					<span class="sx_tk_xx mar" value="玫瑰金">玫瑰金</span>
				</p>
				<p class="sx_tk_p2 N" style="display:none;">
					<span class="sx_mor" value="128">128G</span>
				</p>
				
				<span style="display:none;" class="tz"></span>
				
				<div class="sx_nr_s">您选择了 <span class="j">标准版</span> <span class="y">黑色</span> 需投资<span id="tzmoney" class="q">{$deal_ip}</span></div>
				<div class="sx_qzf" onclick="kk()">去支付</div>
			</div>
			
		</div>
	</body>
</html>
<script src="../../www/Public/Bootstrap/js/jQuery v1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
		function MIX(){
			$(".tuank_1").show();
			$("html").addClass('ovs');
			$("body").addClass('ovs');
			window.scrollTo(0,0);
		}
		function Iphone(){
			$(".tuank_2").show();
			$("html").addClass('ovs');
			$("body").addClass('ovs');
			window.scrollTo(0,0);
		}
	window.onload = function(){
		$(".sx_2").width($("body").width() - 30);
		$(".sx_2_1_s2").width($(".sx_2_1>p").width() - $(".sx_2_1_s1").width());
		
		//小米 选择
		$("#xiaomi_group .J span").click(function(){
			$(this).addClass('sx_mor').siblings().removeClass('sx_mor');
			$(".j").text($(this).text());
			if($(this).attr("value") == 2){
				$(".S span").eq(0).addClass('sx_mor').css("color","#f24e33").siblings().removeClass('sx_mor').css("color","#cbcbcb");
				$(".s").text('黑色');
			}else{
				$(".S span").eq(1).addClass('sx_mor').css("color","#f24e33").siblings().removeClass('sx_mor').css("color","#cbcbcb");
				$(".s").text('黑金');
			}
			ajaxGetMoney('xiaomi');
		});
		$("#xiaomi_group .N span").click(function(){
			$(this).addClass('sx_mor').siblings().removeClass('sx_mor');
			$(".n").text($(this).text());
			ajaxGetMoney('xiaomi');
		});
		//iphone
		$("#apple_group .J span").click(function(){
			$(this).addClass('sx_mor').siblings().removeClass('sx_mor');
			//$(".y").text($(this).text());
			ajaxGetMoney('apple');
		});
		$("#apple_group .S span").click(function(){
			$(this).addClass('sx_mor').siblings().removeClass('sx_mor');
			$(".y").text($(this).text());
			ajaxGetMoney('apple');
		});
	//		alert($(this).attr("value")); //获取val值
		
		$(".gb1").click(function(){
			$(".tuank_1").hide();
			$("html").removeClass('ovs');
			$("body").removeClass('ovs');
			$(".tuank_2").hide();
		});
	}
	$(function(){
		$('.sx_tk_xx').click(function(){
			//console.log($('span.sx_mor').attr('value'));
			var kk = $('span.sx_mor').attr('value');
		});
		$('.sx_qzf').click(function(){
			var jixing = $(this).parent().attr('id');
									
			if(jixing == 'xiaomi_group'){
				ajaxGetMoney('xiaomi');	
			    var money=$('#xiaomi_group').find('span.q').text();
				var id = $('#xiaomi_group').find('span.tz').text();
				//console.log(money);return;
				try{anzjio3(money,id);}
				catch(e){hdmoney(money,id);}               				
			}else{
				ajaxGetMoney('apple');
				var money=$('#apple_group').find('span.q').text();
				var id = $('#apple_group').find('span.tz').text();
				//console.log(money);return;
				try{anzjio3(money,id);}
				catch(e){hdmoney(money,id);} 
				
			}
		});
	});
	function ajaxGetMoney(phone){
		var group='';
		if(phone == 'xiaomi') group = $('#xiaomi_group');
		else group = $('#apple_group');
		var obj ={
			'model': group.find('p.J').find('span.sx_mor').attr('value'),
			'color': group.find('p.S').find('span.sx_mor').attr('value'),
			'memory':group.find('p.N').find('span.sx_mor').attr('value')
		};
		//console.log(obj); return;
		/*/*
		$.ajax('/Api/Sx/Gift',
			obj,
			function(data){
			console.log(data);
				if(data.code == 1){
					group.find('span.q').text(data.money);
					group.find('span.tz').text(data.id);
				}else{
					alert('系统忙！请稍后再试');
				}
			},'json'
		);
		*/
		
		$.ajax({
		    url:'/Api/Special5/Gift',
			type : 'post',
			async: false,//使用同步的方式,true为异步方式
			data:obj,
			dataType:'json',
			success:function(data){
				//console.log(data);
				if(data.code == 1){
					group.find('span.q').text(data.money);
					group.find('span.tz').text(data.id);
				}else{
					alert('系统忙！请稍后再试');
				}
			}
		});
		
		
	}
	
	function hdmoney(amount,pid){
	    var data = {'mark':'buy','amount':amount,'className':'SXProInvestVC','pid':pid
}
	    if(system=8){
					window.webkit.messageHandlers.AppModel.postMessage({body: data});
				}else if(system=7){
					function clickButton1(){
						window.WebViewJavascriptBridge.send(data);
					}
				}

	}
	
	function anzjio3(amount,pid){
			android.immediateInvestment(amount,pid) ;
		}

</script>



